﻿@namespace AntDesign
@inherits AntDomComponentBase


<div class="@ClassMapper.Class" style="@_wrapperStyle" id="@Id" @ref="Ref">
    <img alt="@Alt" class="ant-image-img" src="@Src" style="@Style"
         @onerror="HandleOnError"
         @onloadstart="HandleOnLoadStart"
         @onload="HandleOnLoad" 
		 @onclick="OnClick"/>

    @if (!_loaded && Placeholder != null)
    {
        <div aria-hidden="true" class="ant-image-placeholder">
            @Placeholder
        </div>
    }

    @if (_loaded && !_isError && Preview)
    {
        <div class="ant-image-mask" @onclick="OnMaskClick" @onclick:stopPropagation>
            <div class="ant-image-mask-info">
                <Icon Type="eye" /> @Locale.Preview
            </div>
        </div>
    }
</div>
